package com.filyar.htyd.common;

import lombok.Getter;

/**
 * @author FeiLiYa Feiliya
 * @date: 2024/3/25 17:21
 * @email: root@filyar.com
 */
@Getter
public enum ExceptionEnum {
    //疑似刷接口
    UNDER_ATTACK("777","系统检测你有恶意操作行为，请立即停止你的操作，该操作已通知管理员！",true),
    BLOCK_IP("778","黑名单IP",false),
    //恶意登录行为
    MALICIOUS_LOGIN_BEHAVIOR("888","系统检测你有恶意登录行为，已通知管理员，请立即停止你的操作！",true),
    RESTRICTED_USER("889","用户被禁止登录！",false),
    //请先登录
    PLEASE_LOGIN("-1","请先登录！",false),
    TEST("999","自定义异常抛出内容msg",true),

    //1000到1999 系统用户;
    FAILED_TO_GET_USER("1017","获取系统用户信息失败",false),






    //2000到2999 前台用户;





    //3000到3999移动端用用户;
    PHONE_EXIST("3001","手机号账号已存在",false),
    //账号密码不正确
    USERNAME_PASSWORD_ERROR("3002","账号密码不正确",false),
    //注册审核中
    REGISTER_AUDITING("3003","注册审核中",false),
    //限制登录
    LOGIN_LIMIT("3004","账号已被限制登录",false),
    //原密码错误
    OLD_PASSWORD_ERROR("3006","原密码错误",false),


    ;

    private final String code;
    private final String msg;
    private final Boolean needToSend;

    ExceptionEnum(String code, String msg, Boolean needToSend) {
        this.code = code;
        this.msg = msg;
        this.needToSend = needToSend;
    }

}